#include<iostream>
using namespace std;
int exam5_22()
{
	char ans[200], txt[200];
	int len = 0, ntxt = 0, tmp = 0, i, j;
	while ((txt[ntxt++] = getchar()) != '\n');
	for (i = 0; i < ntxt; i++)
	{
		if (txt[i] != ' '&&txt[i] != '.')
			tmp++;
		else
		{
			if (tmp > len)
			{
				len = tmp;
				for (j = 0; j < tmp; j++)
					ans[j] = txt[i - tmp + j];
			}
			tmp = 0;
		}
	}
	for (j = 0; j <= len - 1; j++)
		cout << ans[j];
	cout << " " << len;
	return 0;
}